home *** CD-ROM | disk | FTP | other *** search
/ Exame Informatica 137 / Exame Informatica 137.iso / Actualizacoes / CatalystMotherboard / 6-9-igp_xp-2k_dd_ccc_wdm_sb_gart_enu_35774.exe / Data1.cab / _7326194D746B4209B5C1E6D32469677A < prev    next >
Text File  |  2003-09-15  |  7KB  |  238 lines

  1. // Copyright (c) 2000-2003 Quadralay Corporation.  All rights reserved.
  2. //
  3.  
  4. function  WWHHandler_Object()
  5. {
  6.   this.mbInitialized = false;
  7.  
  8.   this.fInit              = WWHHandler_Init;
  9.   this.fFinalize          = WWHHandler_Finalize;
  10.   this.fGetFrameReference = WWHHandler_GetFrameReference;
  11.   this.fGetFrameName      = WWHHandler_GetFrameName;
  12.   this.fIsReady           = WWHHandler_IsReady;
  13.   this.fUpdate            = WWHHandler_Update;
  14.   this.fSyncTOC           = WWHHandler_SyncTOC;
  15.   this.fProcessAccessKey  = WWHHandler_ProcessAccessKey;
  16. }
  17.  
  18. function  WWHHandler_Init()
  19. {
  20.   WWHFrame.WWHJavaScript.fInit();
  21. }
  22.  
  23. function  WWHHandler_Finalize()
  24. {
  25.   // Display tab and panel
  26.   //
  27.   if (WWHFrame.WWHHelp.mInitialTabName != null)
  28.   {
  29.     WWHFrame.WWHJavaScript.fStartChangeTab(WWHFrame.WWHJavaScript.mInitialTab);
  30.   }
  31.   else
  32.   {
  33.     WWHFrame.WWHJavaScript.fClickedChangeTab(WWHFrame.WWHJavaScript.mInitialTab);
  34.   }
  35. }
  36.  
  37. function  WWHHandler_GetFrameReference(ParamFrameName)
  38. {
  39.   var  VarFrameReference;
  40.  
  41.  
  42.   switch (ParamFrameName)
  43.   {
  44.     case "WWHTabsFrame":
  45.       // WWHFrame.WWHNavigationFrame.WWHTabsFrame
  46.       //
  47.       VarFrameReference = WWHFrame.WWHHelp.fGetFrameReference("WWHNavigationFrame") + ".frames[0]";
  48.       break;
  49.  
  50.     case "WWHPanelFrame":
  51.       // WWHFrame.WWHNavigationFrame.WWHPanelFrame
  52.       //
  53.       VarFrameReference = WWHFrame.WWHHelp.fGetFrameReference("WWHNavigationFrame") + ".frames[1]";
  54.       break;
  55.  
  56.     case "WWHPanelNavigationFrame":
  57.       // WWHFrame.WWHNavigationFrame.WWHPanelFrame.WWHPanelNavigationFrame
  58.       //
  59.       VarFrameReference = WWHFrame.WWHHelp.fGetFrameReference("WWHPanelFrame") + ".frames[0]";
  60.       break;
  61.  
  62.     case "WWHPanelViewFrame":
  63.       // WWHFrame.WWHNavigationFrame.WWHPanelFrame.WWHPanelViewFrame
  64.       //
  65.       if (WWHFrame.WWHJavaScript.mPanels.fGetCurrentPanelObject().mPanelFilename == "panelvie.htm")
  66.       {
  67.         VarFrameReference = WWHFrame.WWHHelp.fGetFrameReference("WWHPanelFrame");
  68.       }
  69.       else
  70.       {
  71.         VarFrameReference = WWHFrame.WWHHelp.fGetFrameReference("WWHPanelFrame") + ".frames[1]";
  72.       }
  73.       break;
  74.   }
  75.  
  76.   return VarFrameReference;
  77. }
  78.  
  79. function  WWHHandler_GetFrameName(ParamFrameName)
  80. {
  81.   var  VarName = null;
  82.  
  83.  
  84.   // Determine name for this frame
  85.   //
  86.   switch (ParamFrameName)
  87.   {
  88.     case "WWHTabsFrame":
  89.       VarName = "";
  90.  
  91.       if (WWHFrame.WWHJavaScript.mSettings.mTOC.mbShow)
  92.       {
  93.         if (VarName.length > 0)
  94.         {
  95.           VarName += WWHFrame.WWHHelp.mMessages.mAccessibilityListSeparator + " ";
  96.         }
  97.         VarName += WWHFrame.WWHJavaScript.mMessages.mTabsTOCLabel;
  98.       }
  99.  
  100.       if (WWHFrame.WWHJavaScript.mSettings.mIndex.mbShow)
  101.       {
  102.         if (VarName.length > 0)
  103.         {
  104.           VarName += WWHFrame.WWHHelp.mMessages.mAccessibilityListSeparator + " ";
  105.         }
  106.         VarName += WWHFrame.WWHJavaScript.mMessages.mTabsIndexLabel;
  107.       }
  108.  
  109.       if (WWHFrame.WWHJavaScript.mSettings.mSearch.mbShow)
  110.       {
  111.         if (VarName.length > 0)
  112.         {
  113.           VarName += WWHFrame.WWHHelp.mMessages.mAccessibilityListSeparator + " ";
  114.         }
  115.         VarName += WWHFrame.WWHJavaScript.mMessages.mTabsSearchLabel;
  116.       }
  117.  
  118.       VarName = WWHStringUtilities_FormatMessage(WWHFrame.WWHJavaScript.mMessages.mAccessibilityTabsFrameName, VarName);
  119.       VarName = WWHStringUtilities_EscapeHTML(VarName);
  120.       break;
  121.  
  122.     case "WWHPanelFrame":
  123.       // Nothing to do
  124.       //
  125.       break;
  126.  
  127.     case "WWHPanelNavigationFrame":
  128.       VarName = WWHStringUtilities_FormatMessage(WWHFrame.WWHJavaScript.mMessages.mAccessibilityNavigationFrameName,
  129.                                                  WWHFrame.WWHJavaScript.mPanels.fGetCurrentPanelObject().mPanelTabTitle);
  130.       VarName = WWHStringUtilities_EscapeHTML(VarName);
  131.       break;
  132.  
  133.     case "WWHPanelViewFrame":
  134.       VarName = WWHFrame.WWHJavaScript.mPanels.fGetCurrentPanelObject().mPanelTabTitle;
  135.       break;
  136.   }
  137.  
  138.   return VarName;
  139. }
  140.  
  141. function  WWHHandler_IsReady()
  142. {
  143.   var  bVarIsReady = true;
  144.  
  145.  
  146.   if ((WWHFrame.WWHJavaScript.mbChangingTabs) ||
  147.       (WWHFrame.WWHJavaScript.mPanels.mbChangingPanels) ||
  148.       (WWHFrame.WWHJavaScript.mPanels.mbLoading))
  149.   {
  150.     bVarIsReady = false;
  151.   }
  152.  
  153.   return bVarIsReady;
  154. }
  155.  
  156. function  WWHHandler_Update(ParamBookIndex,
  157.                             ParamFileIndex)
  158. {
  159. }
  160.  
  161. function  WWHHandler_SyncTOC(ParamBookIndex,
  162.                              ParamFileIndex,
  163.                              ParamAnchor)
  164. {
  165.   WWHFrame.WWHJavaScript.fSyncTOC(ParamBookIndex,
  166.                                   ParamFileIndex,
  167.                                   ParamAnchor);
  168. }
  169.  
  170. function  WWHHandler_ProcessAccessKey(ParamAccessKey)
  171. {
  172.   switch (ParamAccessKey)
  173.   {
  174.     case 1:
  175.       // Contents exists?
  176.       //
  177.       if (WWHFrame.WWHOutline.mPanelTabIndex != -1)
  178.       {
  179.         // SyncTOC if possible
  180.         //
  181.         if (WWHFrame.WWHControls.fCanSyncTOC())
  182.         {
  183.           WWHFrame.WWHControls.fClickedSyncTOC();
  184.         }
  185.         else
  186.         {
  187.           // Focus if visible, otherwise switch panels
  188.           //
  189.           if (WWHFrame.WWHJavaScript.mPanels.mCurrentPanel == WWHFrame.WWHOutline.mPanelTabIndex)
  190.           {
  191.             WWHFrame.WWHJavaScript.mPanels.fGetCurrentPanelObject().fPanelViewLoaded();
  192.           }
  193.           else
  194.           {
  195.             WWHFrame.WWHJavaScript.fClickedChangeTab(WWHFrame.WWHOutline.mPanelTabIndex);
  196.           }
  197.         }
  198.       }
  199.       break;
  200.  
  201.     case 2:
  202.       // Index exists?
  203.       //
  204.       if (WWHFrame.WWHIndex.mPanelTabIndex != -1)
  205.       {
  206.         // Focus if visible, otherwise switch panels
  207.         //
  208.         if (WWHFrame.WWHJavaScript.mPanels.mCurrentPanel == WWHFrame.WWHIndex.mPanelTabIndex)
  209.         {
  210.           WWHFrame.WWHJavaScript.mPanels.fGetCurrentPanelObject().fPanelNavigationLoaded();
  211.         }
  212.         else
  213.         {
  214.           WWHFrame.WWHJavaScript.fClickedChangeTab(WWHFrame.WWHIndex.mPanelTabIndex);
  215.         }
  216.       }
  217.       break;
  218.  
  219.     case 3:
  220.       // Search exists?
  221.       //
  222.       if (WWHFrame.WWHSearch.mPanelTabIndex != -1)
  223.       {
  224.         // Focus if visible, otherwise switch panels
  225.         //
  226.         if (WWHFrame.WWHJavaScript.mPanels.mCurrentPanel == WWHFrame.WWHSearch.mPanelTabIndex)
  227.         {
  228.           WWHFrame.WWHJavaScript.mPanels.fGetCurrentPanelObject().fPanelNavigationLoaded();
  229.         }
  230.         else
  231.         {
  232.           WWHFrame.WWHJavaScript.fClickedChangeTab(WWHFrame.WWHSearch.mPanelTabIndex);
  233.         }
  234.       }
  235.       break;
  236.   }
  237. }
  238.